package com.richapp.launcher.ui.fragments.child.scenario;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;

import com.richapp.launcher.R;
import com.richapp.launcher.ui.adapter.ChildRoomScenarioGridAdapter;

public class ScenarioControlFragment extends Fragment {
    private GridView roomScenarioGrid = null;
    private ChildRoomScenarioGridAdapter childRoomScenarioGridAdapter = null;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.scenario_control,container,false);
		init(view);
		return view;
	}
	
	private void init(View view){
		roomScenarioGrid = (GridView)view.findViewById(R.id.child_roomscenario_gridview);
        childRoomScenarioGridAdapter = new ChildRoomScenarioGridAdapter(getActivity());
        roomScenarioGrid.setAdapter(childRoomScenarioGridAdapter);
	}

	public static ScenarioControlFragment getInstance() {
		return new ScenarioControlFragment();
	}
}
